import collections

a = dict(name='zhangsan',age=22,add='guangzhou')
print(a)

#方式1
demo = [('two',2), ('one',1), ('three',3)]
#方式2
demo = [['two',2], ['one',1], ['three',3]]
#方式3
demo = (('two',2), ('one',1), ('three',3))
#方式4
demo = (['two',2], ['one',1], ['three',3])
a = dict(demo)
print(a)


keys = ['one', 'two', 'three'] #还可以是字符串或元组
values = [1, 2, 3] #还可以是字符串或元组
a = dict( zip(keys, values) )
print(a)


a = collections.OrderedDict()
a['name'] = 'yejing'
a['age'] = 34


for x,y in a.items():
    print(x)

for i in range(1,10):
    print(i)

